This invention relates to a device and method for control of a direct-current (DC) motor, and more particularly, to control that allows for training a motor-actuated machine as a means of programming.
Small DC motors are used in a variety of low-cost, battery-powered applications, comprising toy cars, mechanical dolls, and hard drives. In such applications, control of the motor is achieved by a motor controller, which is often programmed once during assembly for the lifetime of the motor. A motor controller drives a DC motor by controlling the electrical current that passes through the pins and windings of the motor. Packaged units comprising a motor and motor controller are called smart motors for their ability to be programmed and reprogrammed electronically. Smart motors are used in industrial and academic robotics applications, among others; however, they are too large, powerful, and expensive to be feasible in applications that require low cost of manufacture or portability.
A motor controller physically comprises one or several integrated circuits, of which circuits or subcircuits can be grouped by function. All motor controllers must comprise a control circuit that generates an electrical waveform to drive the motor. If the motor controller employs a digital Complementary Metal-Oxide-Semiconductor (CMOS) architecture, which uses currents typically on the order of tens of microamps, it may further comprise a drive circuit to amplify the drive current to a level of milliamps or more. A motor controller may further comprise an observational apparatus that measures the rotational velocity of the motor and electrically communicates this measurement to the control circuit. With such an addition, closed loop control of the motor is possible, which allows for performance robustness against variability in motor loading or the power supply. The motor controller may accept electronically programmed input commands to be executed immediately or to be stored as part of a program.
Before this invention, motor controllers were programmed electronically, either with a computer, microcontroller, or waveform generator. The programming of the motor controller is therefore reliant on additional equipment and user expertise that are not otherwise required for said low-cost applications. Motor controller commands comprise a desired velocity, position, or torque setting; some may further comprise a velocity, position, or torque condition at which to stop execution of the command; however, the command must be programmed into the motor controller before operation. Motor controllers are therefore programmed, and often designed, for a particular application.
A generally known method for recording the motion of a motor is to sample velocity, position, or torque and to record this data in memory. In this method, the behavior of a motor is reproducible only under conditions identical to those at the time of the recording. To reproduce a behavior conditional on the state of any external sensory or command inputs, it is necessary to store all of the relevant information to that behavior. As an illustrative specific example, consider a motor intended to rotate an arm until a collision has occurred, as signaled by a collision sensor on the arm, and then rotate back. By recording only the said motor state variables at each sampling time, the motor controller would fail to reproduce this behavior if the point of collision or the starting point changes, because it does not record the external state information of the collision sensor.